home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
pc_board
/
lostmu22.zip
/
PAUZ.DOC
< prev
next >
Wrap
Text File
|
1991-06-01
|
6KB
|
154 lines
PAUZ 2.2
Specifiable wait function for batch files
by
Bob Eyer
June 1, 1991
Syntax
------
PAUZ ResumeChar [WaitSeconds|TargetTime]
Definitions
-----------
ResumeChar: The upper or lower case character the user must
press to continue processing before PAUZ finishes
waiting. PAUZ's interpretation of ResumeChar is
not case sensitive.
If SPACE is entered for ResumeChar, PAUZ will use
the Spacebar as the key to hit for continued
processing. If ANY is used then PAUZ uses any key
for this purpose.
Second parameter (optional):
Either -
WaitSeconds: The maximum number of seconds PAUZ will delay
processing.
or -
TargetTime: The time in HH:MM format at which PAUZ will
continue processing. This parameter must be
entered with a colon, in formats like 8:40 or
08:40. Postmeridian times must be entered in
24-hour format.
New:
PAUZ 2.2 now tests whether the current time is at
OR AFTER the TargetTime, to accommodate the needs
of Sysops who use complex batch files to automate
processing, and don't wish to have their batch
programs halt for nearly 24 hours, in case some
process does not quite make it to the given target
time. [Suggestion by Steven Guralnick.]
Where the second parameter is not mentioned, PAUZ will operate in
wait rather than target mode, using defaults as discussed below in
the section entitled "WaitSeconds Defaults".
Discussion
----------
PAUZ i/o is redirectable. So, PAUZ can be used to assist design
of batch file-based remote door programs.
PAUZ detects number keys during a PAUZ wait, to resume processing
by returning an error level identical to the number pressed by the
user at his keyboard.
Examples
--------
The following shows how to use PAUZ with the program's return
message:
(1)
PAUZ ANY
Press any key or wait 30 seconds to continue ...
Pressing any key will return control to DOS (or the batch file)
with error level 1; otherwise, control will be passed
automatically with error level 0 if no key is pressed after 30
seconds have elapsed.
(2)
PAUZ SPACE
Press [SPACEBAR] or wait 30 seconds to continue ...
(3)
PAUZ A
Press [A] or wait 15 seconds to continue ...
(4)
PAUZ A 75
Press [A] or wait 75 seconds to continue ...
Note the effect of overriding the 15 second default for the A
ResumeChar (see below).
(5)
PAUZ A 14:20
Press [A] or wait until 14:20 to continue ...
Notice that the use of a target time causes PAUZ to alter the
format of its wait message.
Note:
In any of these examples, PAUZ will resume with error level x, if
a key in the range 1 to 9 is pressed. The error level is
identical to the number of the key selected.
This is useful in using PAUZ to provide for branching logic in
batch file programs.
WaitSeconds Defaults
--------------------
In the event the user does not mention WaitSeconds on the command
line, PAUZ uses the identity of ResumeChar to determine the
magnitude of the maximum wait time. The following table indicates
the defaults supported:
ResumeChar Default Wait Time
A 15 seconds
B 60
C 120
D 240
Anything used for ResumeChar other than A, B, C, or D will cause
PAUZ to use 30 seconds as the default wait time.
Of course, in the event the user does mention WaitSeconds on the
command line, the user's wait time will always override these
defaults.
Error Levels
------------
PAUZ's normal termination is defined as an uninterrupted PAUZ
run - i.e. without touching any ResumeChar key. In this case,
PAUZ returns an error level of 0.
If the user interrupts PAUZ processing by hitting the required
ResumeChar, then PAUZ returns an error level of 1. If a number
key is pressed, PAUZ returns control to the calling program, with
an error level identical to the number of the key pressed.
DISCLAIMER:
==========
This program is circulated as freeware without any guarantee or
warranty; and the user, by downloading this program, or any
variant thereof or by receiving it or any of its versions in any
other form, agrees to accept full responsibility for its use. It
is therefore understood that the user accepts this program or any
previous version as is.
Bob Eyer The author may also be reached at
Compuserve [73230,2620] ROSE MEDIA 416-733-2285 (Main Conf)
Toronto CMIX 416-277-2363 (Main Conference)
Canada CANADA REMOTE 416-629-7044 (IBM Conf)
-------------------------------------------------------------
End of documentation.